package cn.lsp.sharkmall.mapper;

import cn.lsp.sharkmall.pojo.entity.AdminUser;
import cn.lsp.sharkmall.pojo.entity.User;
import cn.lsp.sharkmall.pojo.vo.AdminVO;
import cn.lsp.sharkmall.util.PageQueryUtil;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description:
 * @Author: sweeterjava@163.com
 * @Date: 2023/2/12
 * @Time: 22:18
 */
public interface AdminUserMapper {
    // 添加管理员
    // int insert(AdminUser record);

    int insertSelective(AdminUser record);

    /**
     * 登陆方法
     *
     * @param userName
     * @param password
     * @return
     */
    AdminUser login(@Param("userName") String userName, @Param("password") String password);

    AdminUser selectByPrimaryKey(Long adminUserId);

    int updateByPrimaryKeySelective(AdminUser record);

    int updateByPrimaryKey(AdminUser record);

    /**
     * 根据用户名查询用户
     *
     * @param userName
     * @return
     */
    int selectByLoginAdminName(String userName);

    int countByAdminUserName(String username);

    int insert(AdminUser adminuser);

    int deleteById(Long adminUserId);

    List<AdminVO> list();
}
